/*
 * Created on Jun 28, 2012
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.waveset.adapter;

import java.sql.*;

public class ConnectionTest{
	public static void main(String[] args) {
		System.out.println("Informix Connect Example.");
		Connection conn = null;
		//String url = "jdbc:informix-sqli://localhost:9089/proteus:INFORMIXSERVER=ol_ids_1150_1";
		String url = "jdbc:informix-sqli://pp45linux53:9088/proteus:INFORMIXSERVER=pp45linux53";
		//String url = "jdbc:informix-sqli://142.183.198.129:1960/proteus:INFORMIXSERVER=rideau";
		//String url = "jdbc:informix-sqli://142.183.198.129:1960";
		String dbName = "proteus";
		String driver = "com.informix.jdbc.IfxDriver";
		//String userName = "CSACIM"; 
		//String password = "CSACIM00";
		
		//String userName = "informix"; 
		//String password = "informix1";
		
		String userName = "informix"; 
		String password = "1nf0rm1X";
		try {
			Class.forName(driver).newInstance();
			conn = DriverManager.getConnection(url,userName,password);
			System.out.println("Connected to the database");
			conn.close();
			System.out.println("Disconnected from database");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}